﻿using Architecture.Domain.RBAC;
using Architecture.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Repository.Impl
{
    public class PrivilegRepository : BaseRepository<Privileges>, IPrivilegRepository
    {
        /// <summary>
        /// 菜单角色关系权限构造函数
        /// </summary>
        /// <param name="context"></param>
        public PrivilegRepository(EFCoreContext context) : base(context)
        {
        }
        /// <summary>
        /// 添加
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> AddAsync(Privileges entity)
        {
            return await base.AddAsync(entity);
        }
        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="entity"></param>
        /// <returns></returns>
        public async Task<int> UpdateAsync(Privileges entity)
        {
            return await base.UpdateAsync(entity);
        }
        /// <summary>
        /// 显示查询
        /// </summary>
        /// <returns></returns>
        public async Task<List<Privileges>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public async Task<Privileges> GetAsync(int id)
        {
            return await base.GetAsync(id);
        }
    }
}
